#ifndef MENUSELECTIONELEMENT_H_
#define MENUSELECTIONELEMENT_H_

#include "MenuElement.h"
#include "PrintStringList.h"

class MenuSelectionElement : public MenuElement
{
	PrintStringList * stringList;
	void (GameManager::*clickStringAction)(char*);
	int longestStringLength;
	Vector2D textSize;
	void FindLongestString();
	char * selectedElement;
	int selectedIndex;
	bool isSelected;
	bool scrollNeeded;
	int scrollIndex;
	int listLines;
	
	public:
	MenuSelectionElement(TextureManager * textureManager, char * textureName, Vector2D position, Vector2D size, 
						 Vector2D * textureVertices, PrintStringList * stringList);
	MenuSelectionElement(TextureManager * textureManager, char * textureName, Vector2D position, Vector2D size, 
						 Vector2D * textureVertices, GameManager * gameManager, void (GameManager::*clickAction)(char*),
						 PrintStringList * stringList);
	MenuSelectionElement(char * label, TextureManager * textureManager, char * textureName, Vector2D position, 
						 Vector2D size, Vector2D * textureVertices, GameManager * gameManager, 
						 void (GameManager::*clickAction)(char*), PrintStringList * stringList);
	~MenuSelectionElement();
	
	virtual void Draw(Vector2D parentPosition);
	virtual bool Click(Vector2D parentPosition, Vector2D mousePosition);
};
#endif /*MENUSELECTIONELEMENT_H_*/
